using System;
using System.Collections.Generic;
using System.Text;
using System.IO;

namespace CodeFx
{
    public static class ExceptionHelper
    {
        public static void ArrayList_Index(int index, int count)
        {
            if ((index < 0) || (index >= count))
            {
                throw new ArgumentOutOfRangeException(string.Format("index hors limite {0} / {1}", index, count));
            }
        }

        public static void FileNotFound(string FileName)
        {
            if (!File.Exists(FileName))
                throw new FileNotFoundException("The specified text file \"" + FileName + "\" could not be found.");
        }
    }
}
